﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    
    <Storyboard x:Key="hideWindow">
        <DoubleAnimation Duration="0:0:0.200" To="0" Storyboard.TargetProperty="Opacity"/>
    </Storyboard>

    <Storyboard x:Key="slideIn">
        <DoubleAnimation Duration="0:0:0.65" Storyboard.TargetProperty="RenderTransform.X" 
                             To="0">
            <DoubleAnimation.EasingFunction>
                <CubicEase EasingMode="EaseOut"></CubicEase>
            </DoubleAnimation.EasingFunction>
        </DoubleAnimation>
    </Storyboard>

    <Storyboard x:Key="slideOut">
        <DoubleAnimation Duration="0:0:0.65" Storyboard.TargetProperty="RenderTransform.X" 
                             To="800">
            <DoubleAnimation.EasingFunction>
                <CubicEase EasingMode="EaseOut"/>
            </DoubleAnimation.EasingFunction>
        </DoubleAnimation>
    </Storyboard>

    <Storyboard x:Key="slideIn2">
        <ThicknessAnimation Duration="0:0:0.75" Storyboard.TargetProperty="Margin" 
                             To="5,25,5,5" DecelerationRatio="0.9" />
    </Storyboard>

    <Storyboard x:Key="slideOut2">
        <ThicknessAnimation Duration="0:0:0.65" Storyboard.TargetProperty="Margin" 
                             To="800,25,5,5" DecelerationRatio="0.9" />
    </Storyboard>

    <Storyboard x:Key="slideInItems">
        <ThicknessAnimation Duration="0:0:0.75" Storyboard.TargetProperty="Margin" 
                             To="0" DecelerationRatio="0.9" />
    </Storyboard>

    <Storyboard x:Key="slideOutItems">
        <ThicknessAnimation Duration="0:0:0.75" Storyboard.TargetProperty="Margin" 
                             To="800,0,0,0" DecelerationRatio="0.9" />
    </Storyboard>

    <Storyboard x:Key="navPanelOpen">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"  Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
            <SplineDoubleKeyFrame KeySpline="0,0,0.504,1" KeyTime="00:00:00.6000000" Value="117"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <Storyboard x:Key="navPanelClose">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
            <SplineDoubleKeyFrame KeySpline="0.5,0,1,1" KeyTime="00:00:00.7000000" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>

    <Storyboard x:Key="btnNextBackVisible" >
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btnNext" Storyboard.TargetProperty="Visibility">
            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}" />
        </ObjectAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btnBack" Storyboard.TargetProperty="Visibility">
            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}" />
        </ObjectAnimationUsingKeyFrames>
    </Storyboard>

    <Storyboard x:Key="btnNextBackCollapsed" >
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btnNext" Storyboard.TargetProperty="Visibility">
            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}" />
        </ObjectAnimationUsingKeyFrames>
        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="btnBack" Storyboard.TargetProperty="Visibility">
            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}" />
        </ObjectAnimationUsingKeyFrames>
    </Storyboard>

    <TransformGroup x:Key="navPanelTransform">
        <ScaleTransform ScaleX="1" ScaleY="1"/>
        <SkewTransform AngleX="0" AngleY="0"/>
        <RotateTransform Angle="0"/>
        <TranslateTransform X="0" Y="0"/>
    </TransformGroup>
    
<!-- nav open -->
    <Storyboard x:Key="MainNavPanelOpen" Name="navPanelOpen">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
            <SplineDoubleKeyFrame KeySpline="0,0,0.504,1" KeyTime="00:00:00.6000000" Value="-240"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>
    <!-- nav close -->
    <Storyboard x:Key="MainNavPanelClose">
        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
            <SplineDoubleKeyFrame KeySpline="0.5,0,1,1" KeyTime="00:00:00.7000000" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>

</ResourceDictionary>